<?php

namespace addons\sum\controller\store;

use addons\sum\controller\Common;
use addons\sum\service\store\Store as StroeService;
use app\admin\model\sum\store\StoreGoods as StoreGoodsModel;
use app\admin\model\User as UserModel;

class User extends Common
{

    protected $noNeedLogin = [];
    protected $noNeedRight = ['*'];

    /**
     * 员工列表
     * @return void
     */
    public function index()
    {
        $user = auth_user();
        if($user['store_status']!=2){
            $this->error('你还不是商户，暂无权限');
        }
        $store_id=$user['store_id']??'';
        if(!$store_id){
            $this->error('商户参数错误');
        }
        $recodes=UserModel::where('store_id',$store_id)->where('is_staff',1)->paginate();
        $this->success('获取成功', $recodes);
    }

    

}
